function plothist(r1, r2)
    h1 = mean(r1);
    h2 = mean(r2);
    a1 = max(r1);
    i1 = min(r1);
    a2 = max(r2);
    i2 = min(r2);
    
    T = ceil(size(h1, 2) - 1)/2;
    h = max(max(a1),max(a2));
    
    hold off;
    plot([-T:T],h1,'g');
    hold on;
    plot([-T:T],a1,'g');
    plot([-T:T],i1,'g');
    plot([-T:T],h2,'r');
    plot([-T:T],a2,'r');
    plot([-T:T],i2,'r');
    hold off;
    axis([-T T 0 h]);
    title('MAX, MEAN, MIN value');
end
